//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================
#ifndef __CDATAOUTPUTSTREAM_H__
#define __CDATAOUTPUTSTREAM_H__
#include "_CDataOutputStream.h"

CarClass(CDataOutputStream)
{
public:
    CARAPI Close();

    CARAPI Flush();

    CARAPI Write(
        /* [in] */ Byte byte);

    CARAPI WriteBuffer(
        /* [in] */ const BufferOf<Byte> & buffer,
        /* [out] */ Int32 * pBytesWritten);

    CARAPI WriteBufferEx(
        /* [in] */ Int32 offset,
        /* [in] */ Int32 length,
        /* [in] */ const BufferOf<Byte> & buffer,
        /* [out] */ Int32 * pBytesWritten);

    CARAPI WriteInt16(
        /* [in] */ Int16 value);

    CARAPI WriteInt32(
        /* [in] */ Int32 value);

    CARAPI WriteInt64(
        /* [in] */ Int64 value);

    CARAPI WriteFloat(
        /* [in] */ Float value);

    CARAPI WriteDouble(
        /* [in] */ Double value);

    CARAPI WriteAChar(
        /* [in] */ AChar value);

    CARAPI WriteWChar(
        /* [in] */ WChar value);

    CARAPI WriteBoolean(
        /* [in] */ Boolean value);

    CARAPI WriteEMuid(
        /* [in] */ EMuid value);

    CARAPI WriteEGuid(
        /* [in] */ EGuid value);

    CARAPI WriteECode(
        /* [in] */ ECode value);

    CARAPI constructor(
        /* [in] */ IOutputStream * pStream);

    ~CDataOutputStream();

    CDataOutputStream() : m_pIos(NULL) {}

private:
    IOutputStream * m_pIos;
};

#endif // __CDATAOUTPUTSTREAM_H__
